home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 2 / Atari Mega Archive CD - Volume 2.iso / minix / up1510b.tgz / up1510b / src / commands / kermit / ckuus2.c < prev    next >
C/C++ Source or Header  |  1990-07-19  |  26KB  |  886 lines

  1. /*  C K U U S 2  --  "User Interface" STRINGS module for Unix Kermit  */
  2.  
  3. /*
  4.  Author: Frank da Cruz (SY.FDC@CU20B),
  5.  Columbia University Center for Computing Activities, January 1985.
  6.  Copyright (C) 1985, Trustees of Columbia University in the City of New York.
  7.  Permission is granted to any individual or institution to use, copy, or
  8.  redistribute this software so long as it is not sold for profit, provided this
  9.  copyright notice is retained. 
  10. */
  11.  
  12. /*  This module separates long strings from the body of the ckuser module. */  
  13.  
  14. #include "ckcdeb.h"
  15. #include <stdio.h>
  16. #include <ctype.h>
  17. #include "ckcker.h"
  18. #include "ckucmd.h"
  19. #include "ckuusr.h"
  20.  
  21. extern CHAR mystch, stchr, eol, seol, padch, mypadc, ctlq;
  22. extern CHAR data[], *rdatap, ttname[];
  23. extern char cmdbuf[], line[], debfil[], pktfil[], sesfil[], trafil[];
  24. extern int nrmt, nprm, dfloc, deblog, seslog, speed, local, parity, duplex;
  25. extern int turn, turnch, pktlog, tralog, mdmtyp, flow, cmask, timef, spsizf;
  26. extern int rtimo, timint, npad, mypadn, bctr, delay;
  27. extern int maxtry, spsiz, urpsiz, maxsps, maxrps, ebqflg, ebq;
  28. extern int rptflg, rptq, fncnv, binary, pktlog, warn, quiet, fmask, keep;
  29. extern int tsecs, bctu, len, atcapu, lpcapu, swcapu, wsize, sq, rpsiz;
  30. extern int capas;
  31. extern long filcnt, tfc, tlci, tlco, ffc, flci, flco;
  32. extern char *dftty, *versio, *ckxsys;
  33. extern struct keytab prmtab[];
  34. extern struct keytab remcmd[];
  35.  
  36. #ifndef MINIX
  37. static
  38. char *hlp1[] = {
  39. "\n",
  40. "  Usage: kermit [-x arg [-x arg]...[-yyy]..]]\n",
  41. "   x is an option that requires an argument, y an option with no argument:\n",
  42. "     actions (* options also require -l and -b) --\n",
  43. "       -s file(s)   send (use '-s -' to send from stdin)\n",
  44. "       -r           receive\n",
  45. "       -k           receive to stdout\n",
  46. "     * -g file(s)   get remote file(s) from server (quote wildcards)\n",
  47. "       -a name      alternate name, used with -s, -r, -g\n",
  48. "       -x           enter server mode\n",
  49. "     * -f           finish remote server\n",
  50. "     * -c           connect before transaction\n",
  51. "     * -n           connect after transaction\n",
  52. "     settings --\n",
  53. "       -l line      communication line device\n",
  54. "       -b baud      line speed, e.g. 1200\n",
  55. "       -i           binary file or Unix-to-Unix (text by default)\n",
  56. "       -p x         parity, x is one of e,o,m,s,n\n",
  57. "       -t           line turnaround handshake = xon, half duplex\n",
  58. "       -w           don't write over preexisting files\n",
  59. "       -q           be quiet during file transfer\n",
  60. "       -d           log debugging info to debug.log\n",
  61. "       -e length    (extended) receive packet length\n",
  62. " If no action command is included, enter interactive dialog.\n",
  63. ""
  64. };
  65.  
  66. /*  U S A G E */
  67.  
  68. usage() {
  69.     conola(hlp1);
  70. }
  71. #else /* MINIX */
  72. usage () {}
  73. #endif /* MINIX */
  74.  
  75.  
  76. /*  Help string definitions  */
  77.  
  78. #ifndef MINIX
  79. static char *tophlp[] = { "\n\
  80. Type ? for a list of commands, type 'help x' for any command x.\n\
  81. While typing commands, use the following special characters:\n\n\
  82.  DEL, RUBOUT, BACKSPACE, CTRL-H: Delete the most recent character typed.\n\
  83.  CTRL-W: Delete the most recent word typed.\n",
  84.  
  85. "\
  86.  CTRL-U: Delete the current line.\n\
  87.  CTRL-R: Redisplay the current line.\n\
  88.  ?       (question mark) display help on the current command or field.\n\
  89.  ESC     (Escape or Altmode) Attempt to complete the current field.\n",
  90.  
  91. "\
  92.  \\       (backslash) include the following character literally.\n\n\
  93. From system level, type 'kermit -h' to get help about command line args.\
  94. \n",
  95. "" };
  96.  
  97. static char *hmxxbye = "\
  98. Shut down and log out a remote Kermit server";
  99.  
  100. static char *hmxxclo = "\
  101. Close one of the following logs:\n\
  102.  session, transaction, packet, debugging -- 'help log' for further info.";
  103.  
  104. static char *hmxxcon = "\
  105. Connect to a remote system via the tty device given in the\n\
  106. most recent 'set line' command";
  107.  
  108. static char *hmxxget = "\
  109. Format: 'get filespec'.  Tell the remote Kermit server to send the named\n\
  110. files.  If filespec is omitted, then you are prompted for the remote and\n\
  111. local filenames separately.";
  112.  
  113. static char *hmxxlg[] = { "\
  114. Record information in a log file:\n\n\
  115.  debugging             Debugging information, to help track down\n\
  116.   (default debug.log)  bugs in the C-Kermit program.\n\n\
  117.  packets               Kermit packets, to help track down protocol problems.\n\
  118.   (packet.log)\n\n",
  119.  
  120. " session               Terminal session, during CONNECT command.\n\
  121.   (session.log)\n\n\
  122.  transactions          Names and statistics about files transferred.\n\
  123.   (transact.log)\n",
  124. "" } ;
  125.  
  126.  
  127. static char *hmxxlogi[] = { "\
  128. Syntax: script text\n\n",
  129. "Login to a remote system using the text provided.  The login script\n",
  130. "is intended to operate similarly to uucp \"L.sys\" entries.\n",
  131. "A login script is a sequence of the form:\n\n",
  132. "    expect send [expect send] . . .\n\n",
  133. "where 'expect' is a prompt or message to be issued by the remote site, and\n",
  134. "'send' is the names, numbers, etc, to return.  The send may also be the\n",
  135. "keyword EOT, to send control-d, or BREAK, to send a break.  Letters in\n",
  136. "send may be prefixed by ~ to send special characters.  These are:\n",
  137. "~b backspace, ~s space, ~q '?', ~n linefeed, ~r return, ~c don\'t\n",
  138. "append a return, and ~o[o[o]] for octal of a character.  As with some \n",
  139. "uucp systems, sent strings are followed by ~r unless they end with ~c.\n\n",
  140. "Only the last 7 characters in each expect are matched.  A null expect,\n",
  141. "e.g. ~0 or two adjacent dashes, causes a short delay.  If you expect\n",
  142. "that a sequence might not arrive, as with uucp, conditional sequences\n",
  143. "may be expressed in the form:\n\n",
  144. "    -send-expect[-send-expect[...]]\n\n",
  145. "where dashed sequences are followed as long as previous expects fail.\n",
  146. "" };
  147.  
  148. static char *hmxxrc[] = { "\
  149. Format: 'receive [filespec]'.  Wait for a file to arrive from the other\n\
  150. Kermit, which must be given a 'send' command.  If the optional filespec is\n",
  151.  
  152. "given, the (first) incoming file will be stored under that name, otherwise\n\
  153. it will be stored under the name it arrives with.",
  154. "" } ;
  155.  
  156. static char *hmxxsen = "\
  157. Format: 'send file1 [file2]'.  File1 may contain wildcard characters '*' or\n\
  158. '?'.  If no wildcards, then file2 may be used to specify the name file1 is\n\
  159. sent under; if file2 is omitted, file1 is sent under its own name.";
  160.  
  161. static char *hmxxser = "\
  162. Enter server mode on the currently selected line.  All further commands\n\
  163. will be taken in packet form from the other Kermit program.";
  164.  
  165. static char *hmhset[] = { "\
  166. The 'set' command is used to establish various communication or file\n",
  167. "parameters.  The 'show' command can be used to display the values of\n",
  168. "'set' parameters.  Help is available for each individual parameter;\n",
  169. "type 'help set ?' to see what's available.\n",
  170. "" } ;
  171.  
  172. static char *hmxychkt[] = { "\
  173. Type of packet block check to be used for error detection, 1, 2, or 3.\n",
  174. "Type 1 is standard, and catches most errors.  Types 2 and 3 specify more\n",
  175. "rigorous checking at the cost of higher overhead.  Not all Kermit programs\n",
  176. "support types 2 and 3.\n",
  177. "" } ;
  178.  
  179.  
  180. static char *hmxyf[] = { "\set file: names, type, warning, display.\n\n",
  181. "'names' are normally 'converted', which means file names are converted\n",
  182. "to 'common form' during transmission; 'literal' means use filenames\n",
  183. "literally (useful between like systems).\n\n",
  184. "'type' is normally 'text', in which conversion is done between Unix\n",
  185. "newlines and CRLF line delimiters; 'binary' means to do no conversion.\n",
  186. "Use 'binary' for executable programs or binary data.\n\n",
  187. "'warning' is 'on' or 'off', normally off.  When off, incoming files will\n",
  188. "overwrite existing files of the same name.  When on, new names will be\n",
  189. "given to incoming files whose names are the same as existing files.\n",
  190. "\n\
  191. 'display' is normally 'on', causing file transfer progress to be displayed\n",
  192. "on your screen when in local mode.  'set display off' is useful for\n",
  193. "allowing file transfers to proceed in the background.\n\n",
  194. "" } ;
  195.  
  196. static char *hmhrmt[] = { "\
  197. The 'remote' command is used to send file management instructions to a\n",
  198. "remote K